In data communication networks, network congestion may occur, for example, when a port or queue of a network switch is overloaded with traffic, to the extent that it is unable to transmit data at a rate that keeps up with the incoming data that it is receiving. Techniques that are designed to resolve congestion in data communication networks are referred to as congestion control techniques.
Some communication networks apply congestion control mechanisms to mitigate traffic congestion in the network. For example, congestion control for InfiniBand™ networks is specified in “InfiniBand Architecture Specification Volume 1,” release 1.2.1, Annex A10, November, 2007, pages 1650-1697, which is incorporated herein by reference. As another example, congestion control for Ethernet™ networks is specified in IEEE Standard 802.1Qau-2010, entitled “IEEE Standard for Local and Metropolitan Area Networks—Virtual Bridged Local Area Networks; Amendment 13: Congestion Notification,” Apr. 23, 2010.
According to the above-mentioned InfiniBand Annex A10, when a switch detects congestion on a given port, it sends a Forward Explicit Congestion Notification (FECN) by setting a predefined FECN bit on a subset of the packets exiting the port. The target channel adapter (which is the InfiniBand term for a network interface controller, or NIC) of the FECN sends a Backward Explicit Congestion Notification (BECN) to the source of the packet (by sending a specific message or marking a BECN bit in a packet sent to the source) in order to notify the source that congestion has occurred. The source of the congested packet reacts by reducing its injection of packets (i.e., transmission of packets) into the network. The injection rate subsequently increases over time, up to a permitted maximum if no further congestion is encountered. Congestion control of this sort is performed on a per-flow basis, wherein a flow may be defined in terms of a queue pair (QP) or service level (SL) on the port in question of the packet source.
In order to implement this sort of packet injection rate control, the channel adapter uses a congestion control table (CCT), as explained in section 2.2 of Annex A10. Each entry in the CCT specifies a different value of an injection rate delay (IRD) that is to be applied to a given flow, wherein the IRD defines the delay between successive packets transmitted in this flow. In other words, if a packet has been sent in the flow, the next packet from the flow will not be scheduled for transmission until at least a certain minimum time—specified by the IRD—has passed, so that the greater the IRD, the smaller the packet injection rate.
The CCT entry to use at any given time in a given flow, and hence the current IRD value, is specified by a CCT index (CCTI). The CCTI is incremented, and hence the injection rate is decreased for a flow, based on the receipt of BECNs. The CCTI is decremented periodically, and thus the injection rate is increased, based on a CCTI timer. When this timer expires, the CCTI for each flow associated with that timer is decremented by one, thus referencing a CCT entry that has a reduced delay value. When the CCTI reaches zero, no injection rate delay is applied to the flow.